﻿using System;
using System.Security.Principal;
using TestBat.IModels.Domain;

namespace TestBat.Frontend.Helpers
{
    public class AuthenticationHelper
    {
        public static bool Check(ITrainee trainee, IPrincipal principal)
        {
            if (trainee == null)
                throw new ArgumentException("Invalid trainee");

            if (trainee.Username != principal.Identity.Name)
                return false;
            return true;
        }
    }
}
